function [feature] = specturm_feature(file_path,filename) 
        
    close all;
    fs = 100;
    fftpoint = 256;
    
    current_path = pwd;
    cd(file_path);
    data = load(filename, '-ascii');

    cd(file_path);

    c = xcov (data);
    L = length(c);
    Y = fft(c,fftpoint)/L;

    L = fftpoint;
    POWER = 2*abs(Y(1:L/2+1));
    f = fs/2*linspace(0,1,L/2+1);

    segment_point0 = 1 * fftpoint/fs;
    segment_point1 = 4 * fftpoint/fs;
    segment_point2 = 8 * fftpoint/fs;
    segment_point3 = 13 * fftpoint/fs;

    alpha = POWER(segment_point2:segment_point3); 
    beta = POWER(segment_point3:L/2+1);
    theta = POWER(segment_point1:segment_point2); 
    delta =  POWER(segment_point0:segment_point1); 

    totalpower_alpha = sum(alpha);
    totalpower_beta = sum(beta);
    totalpower_theta = sum(theta);
    totalpower_delta = sum(delta);
    totalpower = totalpower_alpha + totalpower_beta + totalpower_theta + totalpower_delta;

    averagepower_alpha = totalpower_alpha/length(alpha);
    averagepower_beta = totalpower_beta/length(beta);
    averagepower_theta = totalpower_theta/length(theta);
    averagepower_delta = totalpower_delta/length(delta);
    averagepower = averagepower_alpha + averagepower_beta + averagepower_theta + averagepower_delta;

    per_aver_alpha = averagepower_alpha / averagepower;
    per_aver_beta = averagepower_beta / averagepower;
    per_aver_theta = averagepower_theta / averagepower;
    per_aver_delta = averagepower_delta / averagepower;
    feature = [averagepower, per_aver_alpha, per_aver_beta, per_aver_theta, per_aver_delta, averagepower_delta];
%     i = 50*L/fs
%     figure;
%     set(gcf,'Color','w');  %Make the figure background white
%     plot(f(1:i), POWER(1:i));
%     set(gca,'Box','off');  %Axes on left and bottom only
%     title(filename);
%     xlabel('Frequency (Hz)');
%     ylabel('POWER');
% 
%     L =  length(data)
%     figure;
%     t = [0:0.01:L/100];
%     length(t)
%     plot(t(1:L),data(1:L))
end 